import random
level = int(input("请输入难度（三岁小孩：30，五岁小孩：50，十岁小孩：100\n"))
lucknum = random.randint(1,level)
guess = int(input("请输入你猜的数字："))
while True:
    if guess == lucknum:
        print ("恭喜你猜对了，嘻嘻\n")
        break
    else:
        print("略略略，笨蛋猜错了！\n")
        if guess > lucknum:
            print("大了")
        else:
            print("小了")
        guess = int(input("请输入你猜的数字："))